package com.hp.dto;


import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.hp.annotation.ExcelDataValidation;
import com.hp.service.template_data.impl.CurriculumSelect;
import com.hp.service.template_data.impl.LevelSelect;
import com.hp.service.template_data.impl.PurposeSelect;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.poi.ss.usermodel.Font;

/**
 * @author hp
 */
@Data
@Accessors(chain = true)
@SuppressWarnings("unused")
public class StudentExcelTemplateDTO {

    @ExcelProperty(index = 0, value = "*Name")
    @ExcelDataValidation(title = "Name", maxValue = "200")
    @ColumnWidth(25)
    @HeadFontStyle(color = Font.COLOR_RED)
    private String name;

    /**
     * 年龄
     */
    @ExcelProperty(index = 1, value = "*age")
    @ExcelDataValidation(title = "age", type = "positive_integer", minValue = "0")
    @ColumnWidth(18)
    @HeadFontStyle(color = Font.COLOR_RED)
    private Integer age;



    /**
     * 学习开始时间
     */
    @ExcelProperty(index = 2, value = "*ProgramStart")
    @ExcelDataValidation(title = "ProgramStart", type = "date", minValue = "1970/01/01", maxValue = "3099/01/01")
    @ColumnWidth(20)
    @HeadFontStyle(color = Font.COLOR_RED)
    private String learnFrom;

    /**
     * 学习结束时间
     */
    @ExcelProperty(index = 3, value = "*ProgramEnd")
    @ExcelDataValidation(title = "ProgramEnd", type = "date", minValue = "1970/01/01", maxValue = "3099/01/01")
    @ColumnWidth(18)
    @HeadFontStyle(color = Font.COLOR_RED)
    private String learnTo;

    /**
     * 是否周末节假日上课
     */
    @ExcelProperty(index = 4, value = "*Holiday/Weekend Lessons")
    @ExcelDataValidation(title = "Holiday/Weekend Lessons", type = "select", source = {"TRUE", "FALSE"})
    @ColumnWidth(40)
    @HeadFontStyle(color = Font.COLOR_RED)
    private Boolean weekendFlag;


    @ExcelProperty(index = 5, value = "*Purpose")
    @ExcelDataValidation(title = "Purpose", type = "select", sourceClass = PurposeSelect.class)
    @ColumnWidth(25)
    @HeadFontStyle(color = Font.COLOR_RED)
    private String purpose;


    @ExcelProperty(index = 6, value = "*Level")
    @ExcelDataValidation(title = "Level", type = "select", sourceClass = LevelSelect.class)
    @ColumnWidth(18)
    @HeadFontStyle(color = Font.COLOR_RED)
    private String level;


    @ExcelProperty(index = 7, value = "Curriculum1")
    @ExcelDataValidation(title = "curriculum1", type = "select", sourceClass = CurriculumSelect.class, key = "curriculum")
    @ColumnWidth(55)
    @HeadFontStyle(color = Font.COLOR_NORMAL)
    private String curriculum1;

    @ExcelProperty(index = 8, value = "Curriculum2")
    @ExcelDataValidation(title = "curriculum2", type = "select", sourceClass = CurriculumSelect.class, key = "curriculum")
    @ColumnWidth(55)
    @HeadFontStyle(color = Font.COLOR_NORMAL)
    private String curriculum2;

    @ExcelProperty(index = 9, value = "Curriculum3")
    @ExcelDataValidation(title = "Curriculum3", type = "select", sourceClass = CurriculumSelect.class, key = "curriculum")
    @ColumnWidth(55)
    @HeadFontStyle(color = Font.COLOR_NORMAL)
    private String curriculum3;


}
